package com.homeparking.manage.service.impl;

import java.util.List;
import com.homeparking.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.homeparking.manage.mapper.ManageHouseAgentMapper;
import com.homeparking.manage.domain.ManageHouseAgent;
import com.homeparking.manage.service.IManageHouseAgentService;

/**
 * 经纪人管理Service业务层处理
 * 
 * @author liuyangyang
 * @date 2025-10-12
 */
@Service
public class ManageHouseAgentServiceImpl implements IManageHouseAgentService 
{
    @Autowired
    private ManageHouseAgentMapper manageHouseAgentMapper;

    /**
     * 查询经纪人管理
     * 
     * @param houseAgentId 经纪人管理主键
     * @return 经纪人管理
     */
    @Override
    public ManageHouseAgent selectManageHouseAgentByHouseAgentId(String houseAgentId)
    {
        return manageHouseAgentMapper.selectManageHouseAgentByHouseAgentId(houseAgentId);
    }

    /**
     * 查询经纪人管理列表
     * 
     * @param manageHouseAgent 经纪人管理
     * @return 经纪人管理
     */
    @Override
    public List<ManageHouseAgent> selectManageHouseAgentList(ManageHouseAgent manageHouseAgent)
    {
        return manageHouseAgentMapper.selectManageHouseAgentList(manageHouseAgent);
    }

    /**
     * 新增经纪人管理
     * 
     * @param manageHouseAgent 经纪人管理
     * @return 结果
     */
    @Override
    public int insertManageHouseAgent(ManageHouseAgent manageHouseAgent)
    {
        manageHouseAgent.setCreateTime(DateUtils.getNowDate());
        return manageHouseAgentMapper.insertManageHouseAgent(manageHouseAgent);
    }

    /**
     * 修改经纪人管理
     * 
     * @param manageHouseAgent 经纪人管理
     * @return 结果
     */
    @Override
    public int updateManageHouseAgent(ManageHouseAgent manageHouseAgent)
    {
        manageHouseAgent.setUpdateTime(DateUtils.getNowDate());
        return manageHouseAgentMapper.updateManageHouseAgent(manageHouseAgent);
    }

    /**
     * 批量删除经纪人管理
     * 
     * @param houseAgentIds 需要删除的经纪人管理主键
     * @return 结果
     */
    @Override
    public int deleteManageHouseAgentByHouseAgentIds(String[] houseAgentIds)
    {
        return manageHouseAgentMapper.deleteManageHouseAgentByHouseAgentIds(houseAgentIds);
    }

    /**
     * 删除经纪人管理信息
     * 
     * @param houseAgentId 经纪人管理主键
     * @return 结果
     */
    @Override
    public int deleteManageHouseAgentByHouseAgentId(String houseAgentId)
    {
        return manageHouseAgentMapper.deleteManageHouseAgentByHouseAgentId(houseAgentId);
    }
}
